using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace Brutal_Dare_Portable
{
    public class InstructionScreen : Microsoft.Xna.Framework.DrawableGameComponent
    {
        SpriteBatch spriteBatch;

        string textLineOne = "The game starts when the music begins!",
                    textLineThree = "Do you want to use the under 18, or over 18 set?", under18 = "Under 18", over18 = "Over 18";

        public InstructionScreen(Game game)
            : base(game)
        {
        }

        public override void Initialize()
        {
            base.Initialize();
        }

        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            base.LoadContent();
        }

        public override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.PaleGoldenrod);

            spriteBatch.Begin();

            spriteBatch.DrawString(((Game1)Game).logoFont, ((Game1)Game).logoText,
                new Vector2((int)((GraphicsDevice.Viewport.TitleSafeArea.Width / 2) - (((Game1)Game).logoFont.MeasureString(((Game1)Game).logoText).X / 2)), 5), Color.Black);

            spriteBatch.DrawString(((Game1)Game).subTextFont, textLineOne,
                    new Vector2((int)((GraphicsDevice.Viewport.TitleSafeArea.Width / 2) - (((Game1)Game).subTextFont.MeasureString(textLineOne).X / 2)), 50), Color.Black);
            spriteBatch.DrawString(((Game1)Game).subTextFont, textLineThree,
                    new Vector2((int)((GraphicsDevice.Viewport.TitleSafeArea.Width / 2) - (((Game1)Game).subTextFont.MeasureString(textLineThree).X / 2)),
                                (int)((54 + (((Game1)Game).subTextFont.MeasureString(textLineOne).Y*2)))), Color.Black);

            spriteBatch.DrawString(((Game1)Game).choiceFont, under18,
                    new Vector2((int)((100)), (int)((GraphicsDevice.Viewport.TitleSafeArea.Height / 2) - (((Game1)Game).choiceFont.MeasureString(under18).Y / 2)) + 100),
                        Color.CadetBlue);
            spriteBatch.DrawString(((Game1)Game).choiceFont, over18,
                    new Vector2((int)((GraphicsDevice.Viewport.TitleSafeArea.Width) - (((Game1)Game).choiceFont.MeasureString(over18).X) - 100),
                                (int)((GraphicsDevice.Viewport.TitleSafeArea.Height / 2) - (((Game1)Game).choiceFont.MeasureString(over18).Y / 2)) + 100),
                        Color.Firebrick);

            spriteBatch.End();

            base.Draw(gameTime);
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }
    }
}
